package cn.vehicle.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum VehicleTypeEnum {

    COMMON("普通车辆"),
    TRANSPORT("运输车辆");

    private final String desc;

    public static String getDescByName(String name) {

        for (VehicleTypeEnum value : values()) {
            if (value.name().equals(name)) {
                return value.getDesc();
            }
        }
        return "";
    }
}
